<!DOCTYPE html>
<html>
<head>
	<link href="/2.ico" rel="shortcut icon" >
	<script type="text/javascript" src="/bui/assets/js/jquery-1.8.1.min.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>用户登录</title>
<STYLE>
body {
	background: #ebebeb;
	font-family: "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", "\9ED1\4F53", Arial, sans-serif;
	color: #222;
	font-size: 12px;
}

* {
	padding: 0px;
	margin: 0px;
}

.top_div {
	background: url("/imge/background/no4.jpg") no-repeat;
	width: 100%;
	height: 500px;
	background-position: center;
}

.ipt {
	border: 1px solid #d3d3d3;
	padding: 10px 10px;
	width: 270px;
	border-radius: 4px;
	padding-left: 35px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s
}

.ipt:focus {
	border-color: #66afe9;
	outline: 0;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
}

.u_logo {
	background: url("/imge/images/username.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 43px;
	left: 50px;
}

.p_logo {
	background: url("/imge/images/password.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 12px;
	left: 50px;
}

a {
	text-decoration: none;
}

.tou {
	background: url("/imge/images/tou.png") no-repeat;
	width: 97px;
	height: 92px;
	position: absolute;
	top: -87px;
	left: 140px;
}

.left_hand {
	background: url("/imge/images/left_hand.png") no-repeat;
	width: 32px;
	height: 37px;
	position: absolute;
	top: -38px;
	left: 150px;
}

.right_hand {
	background: url("/imge/images/right_hand.png") no-repeat;
	width: 32px;
	height: 37px;
	position: absolute;
	top: -38px;
	right: -64px;
}

.initial_left_hand {
	background: url("/imge/images/hand.png") no-repeat;
	width: 30px;
	height: 20px;
	position: absolute;
	top: -12px;
	left: 100px;
}

.initial_right_hand {
	background: url("/imge/images/hand.png") no-repeat;
	width: 30px;
	height: 20px;
	position: absolute;
	top: -12px;
	right: -112px;
}

.left_handing {
	background: url("/imge/images/left-handing.png") no-repeat;
	width: 30px;
	height: 20px;
	position: absolute;
	top: -24px;
	left: 139px;
}

.right_handinging {
	background: url("/imge/images/right_handing.png") no-repeat;
	width: 30px;
	height: 20px;
	position: absolute;
	top: -21px;
	left: 210px;
}
.errorMsg{color: red;font-size: 24px;font-family: "华文琥珀"}
.loginMsg{position: absolute; z-index: 999; top: 300px; left: 70%;} 
</STYLE>

<SCRIPT type="text/javascript">
	$(function() {
		//得到焦点
		$("#password").focus(function() {
			$("#left_hand").animate({
				left : "150",
				top : " -38"
			}, {
				step : function() {
					if (parseInt($("#left_hand").css("left")) > 140) {
						$("#left_hand").attr("class", "left_hand");
					}
				}
			}, 2000);
			$("#right_hand").animate({
				right : "-64",
				top : "-38px"
			}, {
				step : function() {
					if (parseInt($("#right_hand").css("right")) > -70) {
						$("#right_hand").attr("class", "right_hand");
					}
				}
			}, 2000);
		});
		//失去焦点
		$("#password").blur(function() {
			$("#left_hand").attr("class", "initial_left_hand");
			$("#left_hand").attr("style", "left:100px;top:-12px;");
			$("#right_hand").attr("class", "initial_right_hand");
			$("#right_hand").attr("style", "right:-112px;top:-12px");
		});
	});
	
</SCRIPT>
<!-- 登录失败后，提示词10秒之后，自动消失 -->
<script type="text/javascript">
	var num = 2;
	var timer = setInterval('loginMsg()',1000);
	function loginMsg(){
		var loginMsg = $('#loginMsg').html();
		if(loginMsg != null || loginMsg.length != 0) {
			if(num == 0) {
				$('#loginMsg').animate(
						{'width': 300,'left': 200,'opacity': 0},'slow',function(){
							$('#loginMsg').html('');
						}
			        ); 
				
				clearInterval(timer);
			} else {
				num--;
			}
		}
	}
</script>

<meta name="generator" content="mshtml 11.00.9600.17496">
</head>
<body id="bb">
	<form action="/login/login" method="post" >
	<DIV class="top_div">
		<span id="loginMsg" class="errorMsg loginMsg" th:text="${msg}"></span>
	</DIV>
	<DIV style="background:url('/imge/no1.gif') no-repeat; margin: -200px auto auto; border: 1px solid rgb(231, 231, 231); border-image: none; width: 400px; height: 250px; text-align: center;">
		<DIV style="width: 165px; height: 96px; position: absolute;">
			<DIV class="tou"></DIV>
			<DIV class="initial_left_hand" id="left_hand"></DIV>
			<DIV class="initial_right_hand" id="right_hand"></DIV>
		</DIV>
		<P style="padding: 30px 0px 10px; position: relative;">
			<SPAN class="u_logo"></SPAN> 
			<INPUT class="ipt" type="text" name="name" placeholder='请输入用户名或邮箱' value="">
		</P>
		<P style="position: relative;">
			<SPAN class="p_logo"></SPAN> 
			<INPUT class="ipt" id="password" name="password" type="password" placeholder="请输入密码" value="">
		</P>
		<P style="position: relative;padding: 10px 0px 0px;height: 30px;line-height: 30px;">
			<INPUT class="ipt" name="verification" style="width: 200px;" placeholder="请输入验证码码" value="">
			<img id="img"src="/login/verification" style="width: 70px;height: 35px;cursor: pointer;position: relative;top: 13px;" />
		</P>
		<DIV
			style="height: 50px; line-height: 50px; margin-top: 30px; border-top-color: rgb(231, 231, 231); border-top-width: 1px; border-top-style: solid;">
			<P style="margin: 0px 35px 20px 45px;">
				<SPAN style="float: left;"><A style="color: rgb(204, 204, 204);" href="#" onclick='alert("请与管理员联系")'>忘记密码?</A></SPAN>
				<SPAN style="float: right;"><A style="color: rgb(204, 204, 204); margin-right: 10px;" href="#" onclick="alert('该功能暂未开放')">注册</A>
				<input type="submit" style="width:50px;background: rgb(0, 142, 173); padding: 7px 10px; border-radius: 4px; border: 1px solid rgb(26, 117, 152); border-image: none; color: rgb(255, 255, 255); font-weight: bold;"
					value='登录' ></SPAN>
			</P>
		</DIV>
	</DIV>
	</form>
	<script type="text/javascript">
		$(function(){
			var num = 4;
			$('#bb').keydown(function(event){
					if(event.which == 49) {//就是按数字1
						num--;
					} 
					if(num == 0) {
						num = 4;
						window.location="/login/login?root=1";
					} 
					
					if(event.which == 50) {//就是按数字1
						num--;
					} 
					if(num == 0) {
						num = 4;
						window.location="/login/login?root=2";
					}
					
		       });
			
			$('#img').click(function(){
				document.getElementById("img").src = "/login/verification?time="+new Date().getTime();
			});
		});
	</script>
</BODY>
</HTML>